<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>课堂练习：求圆周长和面积</title>
		
	</head>
	<body>
		圆的半径：<input type="text" id="radius" readonly="readonly"/><br />
		圆的周长：<input type="text" id="perimeter" readonly="readonly"/><br />
		圆的面积：<input type="text" id="area" readonly="readonly"/><br />
		<script >
			var r = window.prompt("请输入圆的半径");
			var perimeter = 2*3.14*r;
			var area = 3.14*r*r;
			document.getElementById("radius").value = r;
			document.getElementById("perimeter").value =perimeter;
			document.getElementById("area").value = area;
		</script>
	</body>
</html>
